package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SearchHotKeyMapper;
import com.ruoyi.system.domain.SearchHotKey;
import com.ruoyi.system.service.ISearchHotKeyService;

/**
 * 搜索热词Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-09-30
 */
@Service
public class SearchHotKeyServiceImpl implements ISearchHotKeyService 
{
    @Autowired
    private SearchHotKeyMapper searchHotKeyMapper;

    /**
     * 查询搜索热词
     * 
     * @param id 搜索热词ID
     * @return 搜索热词
     */
    @Override
    public SearchHotKey selectSearchHotKeyById(Long id)
    {
        return searchHotKeyMapper.selectSearchHotKeyById(id);
    }

    /**
     * 查询搜索热词列表
     * 
     * @param searchHotKey 搜索热词
     * @return 搜索热词
     */
    @Override
    public List<SearchHotKey> selectSearchHotKeyList(SearchHotKey searchHotKey)
    {
        return searchHotKeyMapper.selectSearchHotKeyList(searchHotKey);
    }

    /**
     * 新增搜索热词
     * 
     * @param searchHotKey 搜索热词
     * @return 结果
     */
    @Override
    public int insertSearchHotKey(SearchHotKey searchHotKey)
    {
        return searchHotKeyMapper.insertSearchHotKey(searchHotKey);
    }

    /**
     * 修改搜索热词
     * 
     * @param searchHotKey 搜索热词
     * @return 结果
     */
    @Override
    public int updateSearchHotKey(SearchHotKey searchHotKey)
    {
        return searchHotKeyMapper.updateSearchHotKey(searchHotKey);
    }

    /**
     * 批量删除搜索热词
     * 
     * @param ids 需要删除的搜索热词ID
     * @return 结果
     */
    @Override
    public int deleteSearchHotKeyByIds(Long[] ids)
    {
        return searchHotKeyMapper.deleteSearchHotKeyByIds(ids);
    }

    /**
     * 删除搜索热词信息
     * 
     * @param id 搜索热词ID
     * @return 结果
     */
    @Override
    public int deleteSearchHotKeyById(Long id)
    {
        return searchHotKeyMapper.deleteSearchHotKeyById(id);
    }

    @Override
    public List<SearchHotKey> getHots() {
        return searchHotKeyMapper.getHots();
    }
}
